package kr.hkit.powerjava.chapter08;

public class Date {
	private int year;
	private int month;
	private int day;
	private Time times;
	
	public void setDate(int year, int month, int day, Time times)
	{
		this.year = year;
		this.month = (month > 12 || month <0 ? 1 : month);
		this.day = (day > 31 || day <0 ? 1 : day);
		this.times = times;
	}
	
	@Override
	public String toString() {
		return "Date [date=" + year + ", month=" + month + ", day=" + day
				+ ", times=" + times + "]";
	}
	
	

}
